x = [-0.3, -0.1, 0, 0.1, 0.3, 0.3, -0.3];
y = [1, 1, 0.2, 1, 1, -1, -1];

vert = [x', y'];
edge = zeros(7, 2);
edge(:, 1) = [1:7]';
edge(:, 2) = mod(edge(:, 1), 7) + 1; 

param = createParam(0.00001, 0.03, 0.0000025, 0.1);

domain2D = createDomain(vert, edge, param);

dim = size(domain2D.vx, 1);

b = assemblyBoundaryVector(domain2D);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[A, Z] = assemblyMatrix(domain2D);

theta = A \ b;

u = evaluateInteriorPoint([domain2D.vx],[domain2D.vy], domain2D, theta);

% F = evaluateInteriorDeformationGradient([domain2D.vx; rx],[domain2D.vy; ry], domain2D, theta);

% plotStrain( domain2D, rx, ry, 0 )

% plotDeformation(domain2D, rx, ry, b(1:2:2*dim), b(2:2:2*dim), u(:,1), u(:,2));